'use strict';

module.exports = appInfo => {
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1512397191643_7774';

  // add your config here
  config.middleware = [];

 

  config.view = {
    defaultViewEngine: 'nunjucks',
    mapping: {      
      '.html': 'nunjucks',
    }
  },

  config.security = {
     csrf: {
      ignoreJSON: true, 
       ignore: '/*',
       xframe: {
         
       },
    },
    methodnoallow: {
      enable: false
    },
    domainWhiteList: [
      'http://localhost',     
      'http://localhost:8000',
      'http://127.0.0.1:8001',
      'http://www.imshow.vip:8000',  
      'http://www.imshow.vip:8080',      
     
    ]
  };

  config.cors = {
    allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH',
    credentials: true
  }

  config.mongo = {
    client: {
      host: 'www.imshow.vip',
      port: 27017,
      name: 'db_job',
      // user:"u_hl",
      // password:"wyd1313123"
    }, 
  };

  return config;
};
